package com.kili.mirco.spark_als.ref;

import com.google.common.base.Preconditions;
import org.apache.spark.api.java.JavaRDD;
import scala.Serializable;

/**
 * @date 19-6-3
 * @auther jackliang
 * @description TODO
 */
public interface Processor extends Serializable {

    /**
     * Parameter check for different processing algorithms
     */
    default void doBasicValidate(JavaRDD<?> RD) {
        Preconditions.checkArgument(RD != null && !RD.rdd().isEmpty(), "Loading data cannot be empty");
    }

    void doValidate(JavaRDD RDD);

}
